package com.lemon.cloud.springdoc;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

@Data
@ConfigurationProperties(prefix = SpringDocProperties.PREFIX)
@Component
@EnableConfigurationProperties
@Profile(value = {"dev","test"})
public class SpringDocProperties {

    public static final String PREFIX="springdoc";

    /**
     * 作者相关信息
     */
    private Author author;

    /**
     *API的相关信息
     */
    private ApiInfo apiInfo;

    @Data
    public static class ApiInfo{
        String title;
        String description;
        String version;
        String termsOfServiceUrl;
        String license;
        String licenseUrl;
    }

    @Data
    public static class Author{
        private String name;

        private String email;

        private String url;
    }
}
